#ifndef CARDSPOT_H
#define CARDSPOT_H

#include <string>
#include <vector>
#include <renderobject.h>

class Card;
class CardSpot : public RenderObject
{
public:
    CardSpot(int type, const std::string &name = std::string());
    virtual bool canDrop(const Card *) const { return false; }
    virtual bool canDraw() const { return false; }
    virtual bool drop(Card *card);
    const std::vector<Card*> &cards() const;
    std::vector<Card*> cards(Card *from) const;
    void push_back(Card *card);
    int indexOf(const Card *card) const;
    int type() const;
    Card *pop();
#if 0
    enum Flags {
        None = 0x00,
        MultiCard = 0x01
    };
    uint flags() const;
#endif
protected:
    struct Data {
        Data(int typ, const std::string &n) : type(typ), name(n) {}
        std::vector<Card*> cards;
        const int type;
        const std::string name;
    } data;
    friend class Card;
};

#endif
